var pathname = window.location.pathname;
if (pathname != '/') {
    pathname = pathname.replace(/\/$/, '');
}
d3.selectAll('div#nav a').on('mouseover', function () {
    d3.select(this).style("text-decoration", "underline");
}).on('mouseout', function () {
    d3.select(this).style("text-decoration", "none");
});
d3.select('div#nav a[href="' + pathname + '"]').classed('active', true);